<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <input type="button" value="开始抽奖" onclick="start()">
    <script>
        function  start(){
          var num =  parseInt(Math.random()*10+1);//0-1  取不到1
            alert(num);
        }
    </script>
</body>
</html>